import request from '@/utils/request';

/**
 * 查询成本费用管理列表
 * @param query
 * @returns {*}
 */

export const listCostExpenses = (query) => {
  return request({
    url: '/system/costExpenses/list',
    method: 'get',
    params: query
  });
};

/**
 * 查询成本费用管理详细
 * @param costExpensesId
 */
export const getCostExpenses = (costExpensesId) => {
  return request({
    url: '/system/costExpenses/' + costExpensesId,
    method: 'get'
  });
};

/**
 * 新增成本费用管理
 * @param data
 */
export const addCostExpenses = (data) => {
  return request({
    url: '/system/costExpenses',
    method: 'post',
    data: data
  });
};

/**
 * 修改成本费用管理
 * @param data
 */
export const updateCostExpenses = (data) => {
  return request({
    url: '/system/costExpenses',
    method: 'put',
    data: data
  });
};

/**
 * 删除成本费用管理
 * @param costExpensesId
 */
export const delCostExpenses = (costExpensesId) => {
  return request({
    url: '/system/costExpenses/' + costExpensesId,
    method: 'delete'
  });
};
